package games.platformer.actions;

import vooga.actions.MoveAction;
import vooga.entities.Entity;

/**
 * An action for moving left or right in the Platformer game
 * 
 * @author bshelton
 * @author Jonathan Odom
 *
 */

public class PlatformerMoveAction extends MoveAction{

	public PlatformerMoveAction(Entity entity, double direction, double defaultMagnitude) {
		super(entity, direction, defaultMagnitude);
	}
	
	public void stop()
	{
		myEntity.getVelocity().setXChange(0);
		active = false;
	}
	
	public void fire()
	{
		vooga.geom.Vector newVector = new vooga.geom.Vector(myDirection,myDefaultMagnitude);
		newVector = myEntity.getVelocity().add(newVector);
		myEntity.setVelocity(newVector);
	}
	

}
